home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 September (Japanese) / CICA Shareware for Windows CD-ROM (Walnut Creek) (September 1995) (Japanese) (Disc 2).iso / disc2 / nt / ntperf.exe / PERFTOOLS / SRC / PERFMON / PERFDATA.H_ / PERFDATA.H
Encoding:
C/C++ Source or Header  |  1993-05-15  |  4.0 KB  |  163 lines

  1.  
  2. #define dwPerfDataIncrease       0x1000
  3.  
  4. #define AllocatePerfData()      (MemoryAllocate (STARTING_SYSINFO_SIZE))
  5.  
  6.  
  7. //==========================================================================//
  8. //                                   Macros                                 //
  9. //==========================================================================//
  10.  
  11.  
  12. #define IsLocalComputer(a) (!lstrcmp(a,LocalComputerName))
  13. #define IsRemoteComputer(a) (!IsLocalComputer(a))
  14.  
  15.  
  16. //==========================================================================//
  17. //                             Exported Functions                           //
  18. //==========================================================================//
  19.  
  20. #if 0
  21. PPERFOBJECT FirstObject (PPERFDATA pPerfData) ;
  22.  
  23. PPERFOBJECT NextObject (PPERFOBJECT pObject) ;
  24.  
  25. PERF_COUNTER_DEFINITION *
  26. FirstCounter(
  27.     PERF_OBJECT_TYPE *pObjectDef) ;
  28.  
  29. PERF_COUNTER_DEFINITION *
  30. NextCounter(
  31.     PERF_COUNTER_DEFINITION *pCounterDef) ;
  32. #endif
  33.  
  34. #define FirstObject(pPerfData)         \
  35.    ((PPERFOBJECT) ((PBYTE) pPerfData + pPerfData->HeaderLength))
  36.  
  37. #define NextObject(pObject)            \
  38.    ((PPERFOBJECT) ((PBYTE) pObject + pObject->TotalByteLength))
  39.  
  40. #define FirstCounter(pObjectDef)       \
  41.    ((PERF_COUNTER_DEFINITION *) ((PCHAR)pObjectDef + pObjectDef->HeaderLength))
  42.  
  43. #define NextCounter(pCounterDef)       \
  44.    ((PERF_COUNTER_DEFINITION *) ((PCHAR)pCounterDef + pCounterDef->ByteLength))
  45.  
  46. void
  47. GetInstanceName (PPERFINSTANCEDEF pInstance,
  48.                  LPTSTR lpszInstance) ;
  49.  
  50. void
  51. GetPerfComputerName(PPERFDATA pPerfData,
  52.                     LPTSTR szComputerName) ;
  53.  
  54. PERF_INSTANCE_DEFINITION *GetInstanceByName(
  55.     PERF_DATA_BLOCK *pDataBlock,
  56.     PERF_OBJECT_TYPE *pObjectDef,
  57.     LPTSTR pInstanceName,
  58.     LPTSTR pParentName) ;
  59.  
  60.  
  61. PERF_INSTANCE_DEFINITION *GetInstanceByUniqueID(
  62.     PERF_OBJECT_TYPE *pObjectDef,
  63.     LONG UniqueID) ;
  64.  
  65.  
  66. HKEY OpenSystemPerfData (IN LPCTSTR lpszSystem) ;
  67.  
  68.  
  69.  
  70. LONG GetSystemPerfData (
  71.     IN HKEY hKeySystem,
  72.     IN LPTSTR lpszValue,
  73.     OUT PPERFDATA pPerfData, 
  74.     OUT PDWORD pdwPerfDataLen
  75. );
  76.  
  77.  
  78. BOOL CloseSystemPerfData (HKEY hKeySystem) ;
  79.  
  80.  
  81.  
  82. int CBLoadObjects (HWND hWndCB,
  83.                    PPERFDATA pPerfData,
  84.                    PPERFSYSTEM pSysInfo,
  85.                    DWORD dwDetailLevel,
  86.                    LPTSTR lpszDefaultObject,
  87.                    BOOL bIncludeAll) ;
  88.  
  89. int LBLoadObjects (HWND hWndCB,
  90.                    PPERFDATA pPerfData,
  91.                    PPERFSYSTEM pSysInfo,
  92.                    DWORD dwDetailLevel,
  93.                    LPTSTR lpszDefaultObject,
  94.                    BOOL bIncludeAll) ;
  95.  
  96.  
  97. BOOL UpdateSystemData (PPERFSYSTEM pSystem, 
  98.                        PPERFDATA *ppPerfData) ;
  99.  
  100.  
  101. BOOL UpdateLinesForSystem (LPTSTR lpszSystem, 
  102.                            PPERFDATA pPerfData, 
  103.                            PLINE pLineFirst) ;
  104.  
  105. void FailedLinesForSystem (LPTSTR lpszSystem, 
  106.                            PPERFDATA pPerfData, 
  107.                            PLINE pLineFirst) ;
  108.  
  109.  
  110. BOOL UpdateLines (PPPERFSYSTEM ppSystemFirst,
  111.                   PLINE pLineFirst) ;
  112.  
  113.  
  114. BOOL PerfDataInitializeInstance (void) ;
  115.  
  116.  
  117. DWORD
  118. QueryPerformanceName(
  119.     PPERFSYSTEM pSysInfo,
  120.     DWORD dwTitleIndex,
  121.     LANGID LangID,
  122.     DWORD cbTitle,
  123.     LPTSTR lpTitle,
  124.     BOOL Help
  125.     );
  126.  
  127. PERF_INSTANCE_DEFINITION *
  128. FirstInstance(
  129.     PERF_OBJECT_TYPE *pObjectDef) ;
  130.  
  131.  
  132.  
  133. PERF_INSTANCE_DEFINITION *
  134. NextInstance(
  135.     PERF_INSTANCE_DEFINITION *pInstDef) ;
  136.  
  137.  
  138.  
  139. int CounterIndex (PPERFCOUNTERDEF pCounterToFind,
  140.                   PPERFOBJECT pObject) ;
  141.  
  142.  
  143. DWORD GetSystemNames(PPERFSYSTEM pSysInfo) ;
  144.  
  145.  
  146.  
  147. PERF_OBJECT_TYPE *GetObjectDefByTitleIndex(
  148.     PERF_DATA_BLOCK *pDataBlock,
  149.     DWORD ObjectTypeTitleIndex) ;
  150.  
  151.  
  152. PERF_OBJECT_TYPE *GetObjectDefByName(
  153.     PPERFSYSTEM pSystem,
  154.     PERF_DATA_BLOCK *pDataBlock,
  155.     LPTSTR pObjectName) ;
  156.  
  157.  
  158. LPTSTR
  159. InstanceName(
  160. PERF_INSTANCE_DEFINITION *pInstDef) ;
  161.  
  162. 
  163.